package cn.dao.claim.impl;

import cn.dao.claim.ClaimVoucherDetailDao;
import cn.entity.ClaimVoucherDetail;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

@Repository("claimVoucherDetailDao")
public class ClaimVoucherDetailDaoImpl extends HibernateDaoSupport implements ClaimVoucherDetailDao {
    public ClaimVoucherDetailDaoImpl() {
    }
    @Autowired
    public ClaimVoucherDetailDaoImpl(@Qualifier("sessionFactory")SessionFactory sessionFactory){
        this.setSessionFactory(sessionFactory);
    }

    @Override
    public void save(ClaimVoucherDetail claimVoucherDetail) {
        getHibernateTemplate().save(claimVoucherDetail);
    }

    @Override
    public void delete(ClaimVoucherDetail claimVoucherDetail) {
        getHibernateTemplate().delete(claimVoucherDetail);
    }
}
